All Questions
4 questions
0votes
3answers
125views
Should we test private data (static objects in this case) to make sure it maintains its structure?
I had a discussion at work about whether to unit test a private static object we're using as data for a public component. const data = { 45: { name: 'John' }, 2: { name: 'Patricia' }, 27: { name: '...
4votes
5answers
5kviews
Is it bad practice to supply command line arguments for unit tests
I am on C++ and using gtest as the main framework. Say I have a edge detection function I want to test that takes an image as an input and returns the edge detected image. I have 3 images ready to be ...
8votes
3answers
4kviews
Is it right to skip unit testing and go straight writing integration tests if there's no point of testing the unit in isolation?
According to Martin Fowler's article, https://martinfowler.com/bliki/TestPyramid.html It is advisable to write more unit tests than integration tests. Does this mean ideally that every unit of work ...
2votes
1answer
1kviews
Unit-testing databases: test all possible permutations of read and write to table?
I am testing a resource management class that is interacting with a database or a file system, or a combination of both. I was wandering if it is the norm to test all possible permutations of read and ...